Skip to content

Conversation

@olexale
Copy link
Owner

@olexale olexale commented Sep 23, 2025

Fix #108
This pull request improves the handling of data tables in BDD

@olexale olexale requested a review from Copilot September 23, 2025 16:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request fixes data table content handling in BDD by properly distinguishing between cucumber data tables and examples tables, addressing issue #108.

  • Introduces a heuristic to differentiate between data tables intended as cucumber arguments versus examples for parameter expansion
  • Updates generated test code to properly quote column headers in data table definitions
  • Adds comprehensive test coverage for the new scenario outline functionality with data table variables

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
test/data_tables_test.dart Updates expected test outputs with quoted column headers and adds new test case for scenario outline with data table variables
lib/src/scenario_generator.dart Implements logic to handle placeholders differently in step text versus data table arguments for scenario outlines
lib/src/feature_file.dart Refactors line processing to use new data table examples detection logic
lib/src/data_table_parser.dart Adds heuristic function to determine when tables should be treated as examples versus cucumber data tables

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

group(\'\'\'Testing feature\'\'\', () {
testWidgets(\'\'\'Outline: Testing visibility of data table in examples ('initial')\'\'\', (tester) async {
await iLoadTheSplashScreen(tester);
await iVerifyWelcomeMessagesWith(tester, 'initial', const bdd.DataTable([[text], ['Welcome']]));
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable text is not quoted as a string literal. Based on the pattern in the rest of the file, this should be 'text' to match the expected string format for data table headers.

Suggested change
await iVerifyWelcomeMessagesWith(tester, 'initial', const bdd.DataTable([[text], ['Welcome']]));
await iVerifyWelcomeMessagesWith(tester, 'initial', const bdd.DataTable([['text'], ['Welcome']]));

Copilot uses AI. Check for mistakes.
@olexale olexale merged commit 80bb69e into master Sep 23, 2025
1 check passed
@olexale olexale deleted the fix-datatable-content branch September 23, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataTable content is not included in generated Dart test from Scenario Outline with Examples

1 participant